<template>
  <div class="driveinfo">
    <div class="section">
      <div class="row"> <div class="title">名称:</div>{{ info.name }} </div>
      <!-- <div class="row"> <div class="title">设备型号ID:</div>{{ info.device_type_id }} </div> -->
      <div class="row"> <div class="title">协议类型:</div>{{ info.detail.type }} </div>
      <div class="row">
        <div class="title">驱动配置:</div> <div class="text">{{ info.detail.config }}</div></div
      >
      <div class="row baseline">
        <div class="title">事件列表:</div>
        <div class="chiderList">
          <div class="row" v-for="(item, index) in info.detail.event_list" :key="index">
            <div class="childrentext">事件标题: {{ item.event_title }}</div
            ><div class="childrentext">事件名称: {{ item.event_name }}</div>
          </div>
        </div>
      </div>
      <div class="row baseline">
        <div class="title">方法列表:</div>
        <div class="chiderList">
          <div class="row" v-for="(item, index) in info.detail.method_list" :key="index">
            <div class="childrentext">方法标题: {{ item.method_title }}</div
            ><div class="childrentext">方法名称: {{ item.method_name }}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script lang="ts">
  import { defineComponent } from 'vue';
  export default defineComponent({
    props: ['info'],
    setup() {},
  });
</script>

<style lang="less" scoped>
  .driveinfo {
    width: 100%;
    height: 350px;
    display: flex;
    flex-direction: column;
    overflow-y: visible;
    overflow-x: hidden !important;
    .row {
      width: 100%;
      display: flex;
      align-items: baseline;
      padding: 5px 20px;
      box-sizing: border-box;
    }
    .title {
      width: 90px;
      font-weight: bold;
      margin-bottom: 0px;
    }
    .text {
      flex: 1;
    }
    .section {
      border: 1px solid #efefef;
      min-height: 300px;
    }

    .section .row:not(:last-child) {
      border-bottom: 1px solid #efefef;
    }
    .baseline {
      align-items: baseline;
      flex-direction: column;
    }
    .baseline .title {
      margin: 3px 0px;
    }
    .chiderList {
      width: 100%;
    }
    .chiderList .chider_title {
      width: 100px;
    }

    .childrentext {
      width: 50%;
    }
  }
</style>
